<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>


        //函数  
        function nine() {
            for (var i = 1; i < 10; i++) {


                var row = ""
                for (var j = 1; j <=i; j++) {

                  
                    row = row + " " + j + "*" + i + "=" + (j * i) + " "
                }

                console.log(row);

            }

        }

        nine()
        nine()

        /**
         * 
         *  方法的参数
         * 
         */
        function sum(numa,numb){
            let result = numa + numb;
            console.log("result ",result);
            
            return result;
        }



        function calc(){
            //方法的实际参数
            let numa = 50;
            let numb = 20;
            let rs = sum(numa,numb);
            console.log("计算时候的2倍结果" ,(2*rs));
            
        }


    </script>
</head>

<body>


    <button onclick="nine();">执行乘法口诀</button>  <br>
    <button onclick="calc();">加和</button>



</body>

</html>